<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.ce.framework.util.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/login/";
String loginAction = basePath + "Login_login.action";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><%=com.ce.util.RegeditUtil.getRegeditStringValue("SYSTEM_SEG_NAME") %></title>
    <%@ include file="/common/common.jsp"%>
<SCRIPT type=text/javascript>
    	$(function(){
    	    //点击提交按钮事件
            $('#imageField').click(function(){
            	$('#loginForm').submit();
            });
            //键盘提交
    		$('body').keypress(function (){
    			if (event.keyCode == 13){
    				event.returnValue=false;
    				event.cancel = true;
    				$('#imageField').click();
    			}
    		});
			//显示弹出层

			$('#show_Chrome').css("top",$('#Chrome').offset().top-$('#show_Chrome').height());
			$('#show_Chrome').css("left",$('#Chrome').offset().left-20);
			//$('#show_Chrome').css("display",'');
			$("#img_Chrome").click(function(){$('#show_Chrome').css("display",'none');});
			$('#Chrome').click(function(){
				$('#show_Chrome').css("top",$('#Chrome').offset().top-$('#show_Chrome').height());
			    $('#show_Chrome').css("left",$('#Chrome').offset().left-20);
			    $('#show_Chrome').show();
				});
			if(/msie/.test(navigator.userAgent.toLowerCase())&&typeof document.body.style.maxHeight === "undefined"){
				$('#show_Chrome').show();
			}

			if($.cookie('lastUserName')){//使用上次登录的用户名
				$('#username').val($.cookie('lastUserName'));
			}
    		$('#loginForm').form({
			        url:'<%=loginAction%>',
			        onSubmit: function(){
			        	$.cookie('lastUserName',$('#username').val(),{expires:9999999});
			             return $(this).form('validate');
			        },
			        success:function(data){
			        	function showtip(title,msg){
			        		$('#errmsg').show();
			        		$('#errmsg').html(msg);
			        	}
			            try{
				            jsonReStr = jQuery.parseJSON(data);  //获取从服务器得到的数据反馈信息
				            if(jsonReStr.opState=="success"){    //操作成功处理
					            document.location.href=jsonReStr.opInfo;return;
				            }
				            else if(jsonReStr.opState=="failure"&&jsonReStr.opInfo=="userError"){  //操作失败处理
				                showtip('消息提示','用户名或密码错误！','error');
				            }
				            else if(jsonReStr.opState=="failure"&&jsonReStr.opInfo=="checkNumError"){  //验证码错误
				                showtip('消息提示','验证码错误！','error');
				            }
				            else{
				            	showtip('消息提示','登录时发生错误！<br>详细信息:<font color=red>'+jsonReStr.opInfo+'</font>','error');
				            }
				            $('#password').val("");
			            }catch(e){window.e=e;
			               showtip('消息提示','出现系统错误!<br>详细信息:<font color=red style="display:block;height:300px;overflow:scroll;">'+e+'</font>','error');
			            }
			        }
				});
        });
        
        
    </SCRIPT>
<style>
.logintxt{ font-size:14px; font-weight:bold; color:#026F93; font-family:"宋体"}
.logininot{ border:1px solid #ccc; width:80%; height:20px; background-color:#FFF; padding-top:2px}
.bomdiv{position:relative; top:510px; left:-340px; display::inline-table; float:left; }
.bomdiv ul{ list-style:none; width:75px; float:left; padding:0; margin:0}
.bomdiv ul li{}
</style>
</head>

<BODY style="OVERFLOW-Y: hidden; background-color:#FFF" scroll=no text="#000000" leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<div style="width:100%; text-align:center;background-image:url(../images/login/login_bgs.jpg); background-repeat:repeat-x; background-color:#FFF; height:100%;">
<div style="background-image:url(../images/login/login_bg.jpg); background-repeat:no-repeat; background-position:center center; width:1002px; height:595px; margin-right: auto;margin-left: auto;" align="center">
<div id="login_txt" style="position:relative; left:70px; top:90px; float:left; width:398px; height:88px">
<%
String lpath = com.ce.util.RegeditUtil.getRegeditStringValue("PROJECT_LOGO");
if(lpath==null||lpath.trim().length()==0){
	lpath = "/";
}
else{
	lpath += "/";
}
%>
   <img src="<%=path %>/images/login/login_txt.png"/>
</div>
<script>
if(/msie/.test(navigator.userAgent.toLowerCase())&&typeof document.body.style.maxHeight === "undefined"){
	$('#login_txt').html('<SPAN style="DISPLAY:inline-block;FILTER:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'<%=path %>/images/login/login_txt.png\', sizingMethod=\'scale\');WIDTH:443px;HEIGHT:142px"></SPAN>');
}
</script>
<div id="bominfo" class="bomdiv">
<ul><li><a href="testSpeed.jsp" target="_blank"><img src="../images/login/net_speed.png" width="32" height="32" border="0" /><br>网速测试</a></li></ul>
<!-- <ul><li><a href="#"><img src="images/myIe.png" width="32" height="32" border="0" /><br>myIe</a></li></ul>
<ul><li><a href="#"><img src="images/ie.png" width="32" height="32" border="0" /><br>IE</a></li></ul>
<ul><li><a href="#"><img src="images/Firefox.png" width="32" height="32" border="0" /><br>火狐</a></li></ul>
 -->
<ul><li id="Chrome"><a href="/browser/IEFrame.zip" target="_blank"><img src="../images/login/ie_chrome.png" width="32" height="32" border="0" /><br>IE浏览器插件</a></li></ul>
<ul><li id="Chrome"><a href="/browser/IE8-xp.zip" target="_blank"><img src="../images/login/ie8.png" width="32" height="32" border="0" /><br>IE8浏览器</a></li></ul>
<ul><li ><a href="/browser/ChromeSetup.zip"><img src="../images/login/Chrome.png" width="32" height="32" border="0" /><br>谷歌浏览器</a></li></ul>
</div>
<div style="position:relative; float:right; top:100px; right:80px">
<table width="450" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div id="lg_top" style="background-image:url(../images/login/lg_top.png); background-repeat:repeat-x; height:43px; width:auto; background-position:center top"></div></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="109"><img src="../images/login/lg_topleft.png" width="109" height="86" /></td>
        <td align="center" valign="middle" style="background-image:url(../images/login/lg_topbg.jpg); background-repeat:repeat-x"><img src="../images/login/lg_logo.png" width="154" height="23" /></td>
        <td width="72"><img src="../images/login/lg_toprgt.png" width="72" height="86" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="22"><img src="../images/login/lg_bomleft.png" width="22" height="205" /></td>
        <td style="background-image:url(../images/login/lg_bombg.jpg); background-repeat:repeat-x" valign="top">
        <form action="<%=loginAction %>" method="post" id="loginForm" name="loginForm"> 
          <table width="90%" border="0" align="center" cellpadding="5" cellspacing="5">
            <tr>
              <td width="21%">&nbsp;</td>
              <td width="22%">&nbsp;</td>
              <td width="57%">&nbsp;</td>
            </tr>
            <tr>
              <td width="21%" align="right" class="logintxt"> 用户名：</td>
              <td colspan="2" align="left"><INPUT class="easyui-validatebox"  id="username" name="username"  required="true" validType="length[1,30]" missingMessage="请输入用户名" style="WIDTH: 180px; HEIGHT: 25px;line-height:25px; border:1px solid #cccccc; background-color:#ffffff" ></INPUT></td>
            </tr>
            <tr>
              <td align="right"  class="logintxt">密码：</td>
              <td colspan="2" align="left"><INPUT class="easyui-validatebox"  id="password" name="password" required="true" validType="length[5,20]"  missingMessage="请输入密码" style="WIDTH: 180px; HEIGHT: 25px;line-height:25px; border:1px solid #cccccc; background-color:#ffffff" type=password></INPUT></td>
            </tr>
            <!-- 
            <tr>
              <td align="center" class="logintxt">验证码：</td>
              <td width="46%" align="left"><input type="password" id="checkNum" name="checkNum" required="true" missingMessage="请输入验证码"/></td>
              <td width="33%" align="left"><img height="18" width="50" border="0" src="/mis/common/imgcheck.jsp" onclick="window.location.reload()" style="cursor:pointer" /></td>
            </tr>
             -->
            <tr>
              <td colspan="2" align="left"><div id="errmsg" style='color:red;padding-left:8px;height:25px;line-height:25px;overflow:hidden;'></div></td>
              <td align="left"><img name="imageField" id="imageField" src="../images/login/smt.gif" style="cursor:pointer"/>
                <!-- <img src="images/resmt.gif" width="103" height="30" style="cursor:pointer" /> --></td>
            </tr>
            <%String href=RegeditUtil.getRegeditStringValue("LOGIN_NEWS_HREF");
            String text = RegeditUtil.getRegeditStringValue("LOGIN_NEWS_TEXT");
            if(StringUtil.isNotBlank(href)&&StringUtil.isNotBlank(text)){    %>
            <tr>
              <td colspan=3 style="padding-left:13px;"><a style="color:blue;" target="_blank" href="<%=href%>"><%=text%></a></td>
            </tr>
            <%} %>
          </table>
        </form>
        </td>
        <td width="22"><img src="../images/login/lg_bomrgt.png" width="22" height="205" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center"><table id="lg_bombgs" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12"><img src="../images/login/lg_lbom.png" width="12" height="28" /></td>
        <td style="background-image:url(../images/login/lg_bombgs.png); background-repeat:repeat-x">&nbsp;</td>
        <td width="12"><img src="../images/login/lg_rbom.png" width="12" height="28" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</div>
</div>
</div>
<!--弹出层-->
<div style="width:250px; position:absolute; z-index:2; display:none ;" id="show_Chrome">
<div id="div_close" style="width:100%; float:left; text-align:right; position:relative;  z-index:1"><img src="../images/login/closeBtn.png" width="27" height="27" id="img_Chrome" style="cursor:pointer"/></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:-25px; float:left;">
  <tr>
    <td width="20" height="20" valign="top"><img src="../images/login/leftTop.png" width="20" height="20" /></td>
    <td style="background-image:url(../images/login/top.png); background-repeat:repeat-x">&nbsp;</td>
    <td width="20" height="20" valign="top"><img src="../images/login/rightTop.png" width="20" height="20" /></td>
  </tr>
  <tr>
    <td style="background-image:url(../images/login/left.png); background-repeat:repeat-y">&nbsp;</td>
    <td valign="top" style=" background-color:#FFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="30" align="center"><img src="../images/login/Phone_43.gif" /></td>
        <td style="font-size:12px; color:#333"><a href="/browser/IEFrame.zip">系统检测到您正在使用IE6，为获取更好的使用体验，建议您安装浏览器插件或使用以下浏览器。<img src="../images/login/down.gif" border="0" /></a></td>
      </tr>
    </table></td>
    <td style="background-image:url(../images/login/right.png); background-repeat:repeat-y">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><img src="../images/login/leftBottom.png" width="20" height="20" /></td>
    <td style="background-image:url(../images/login/bottom.png); background-repeat:repeat-x"><img src="../images/login/arrowBottom.png" width="60" height="20" /></td>
    <td valign="top"><img src="../images/login/rightBottom.png" width="20" height="20" /></td>
  </tr>
</table>
</div>
<script>
if(/msie/.test(navigator.userAgent.toLowerCase())&&typeof document.body.style.maxHeight === "undefined"){
	$('#show_Chrome td,#lg_top,#lg_bombgs td').each(function(){
		var url = $(this).css('background-image');
		if(url&&url!='none'){
			$(this).css('background-image',url.replace('.png','.gif'));
		}
	});
	$('#show_Chrome img,#bominfo img,#lg_bombgs img').each(function(){
		var url = $(this).attr('src');
		if(url&&url.length>4&&url.substr(url.length-4,4)=='.png'){
			$(this).attr('src',url.replace('.png','.gif'));
		}
	});
}
</script>
<div>kdjhskajdhskajdhaskjdhaskjdh</div>
</body>
</html>
